﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="FastSpring.Core.Model.Company,FastSpring.Net.Core" table="Sys_Company" lazy="false">
    <id name="CID" column="CID" type="Int32">
      <generator class="native" />
    </id>
    <property name="CompanyCode" column="CompanyCode"/>
    <property name="CompanyName" column="CompanyName"/>
    <property name="CompanyAlias" column="CompanyAlias"/>
    <property name="SuperCode" column="SuperCode"/>
    <property name="CpLevelCode" column="CpLevelCode"/>
    <property name="CpCountry" column="CpCountry"/>
    <property name="CpProvince" column="CpProvince"/>
    <property name="CpCity" column="CpCity"/>
    <property name="CpAdd" column="CpAdd"/>
    <property name="CpPhone" column="CpPhone"/>
    <property name="CpFax" column="CpFax"/>
    <property name="CpMan" column="CpMan"/>
    <property name="BankAccount" column="BankAccount"/>
    <property name="WarrantNum" column="WarrantNum"/>
    <property name="TaxNum" column="TaxNum"/>
    <property name="CpType" column="CpType"/>
    <property name="CpCycle" column="CpCycle"/>
    <property name="IsActive" column="IsActive"/>
    <property name="Description" column="Description"/>
  </class>
  <query name="GetCompanysList">
    <![CDATA[from Company company ]]>
  </query>
  <query name="CompanyList">
    <![CDATA[Select company.CompanyName,company.CID from Company company ORDER BY company.CID]]>
  </query>
  <query name="CompanyClientsList">
    <![CDATA[from Company company WHERE company.CpType=2 AND company.IsActive=1 ORDER BY company.CID]]>
  </query>
</hibernate-mapping>